package xin.nick.summer.exception;

/**
 * @author Nick
 * @date 2021/5/22
 * @description
 */
public class NoSuchBeanDefinitionException extends BeansException {
    private String beanName;

    public NoSuchBeanDefinitionException(String name) {
        super("No bean named '" + name + "' available");
        this.beanName = name;
    }

    public NoSuchBeanDefinitionException(String name, String message) {
        super("No bean named '" + name + "' available: " + message);
        this.beanName = name;
    }


    public String getBeanName() {
        return this.beanName;
    }

    public int getNumberOfBeansFound() {
        return 0;
    }
}
